package cn.com.joco.dk.webby.excel;

import java.util.List;

public class RowData {
	private int rowIndex;
	private List<CellData> cells;

	public RowData() {

	}

	public int getRowIndex() {
		return rowIndex;
	}

	public void setRowIndex(int rowIndex) {
		this.rowIndex = rowIndex;
	}

	public RowData(List<CellData> cells) {
		this.cells = cells;
	}

	public void setCells(List<CellData> cells) {
		this.cells = cells;
	}

	public List<CellData> getCells() {
		return cells;
	}

	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		int index = 0;
		for (CellData cell : cells) {
			index++;
			sb.append(cell.getIndex());
			sb.append(",");
			sb.append(cell.getValue());
			if (index != cells.size()) {
				sb.append(";");
			}
		}
		return sb.toString();
	}
}
